﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/principal.Master" AutoEventWireup="true" CodeBehind="eventos.aspx.cs" Inherits="WebApplicationCultura.Pages.eventos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>Eventos</h2>
    <div id="tabla">
        Eventos disponibles<br />
        <br />
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" DataSourceID="SqlDataSourceEventos" 
            EnableModelValidation="True" AutoGenerateColumns="False" 
            DataKeyNames="ID_EVENTO" 
            onselectedindexchanged="GridView1_SelectedIndexChanged">
            <Columns>
                <asp:BoundField DataField="NOMBRE_EVENTO" HeaderText="Nombre" 
                    SortExpression="NOMBRE_EVENTO" />
                <asp:BoundField DataField="UBICACION_EVENTO" HeaderText="Ubicación" 
                    SortExpression="UBICACION_EVENTO" />
                <asp:BoundField DataField="DESCRIPCION_EVENTO" HeaderText="Descripción" 
                    SortExpression="DESCRIPCION_EVENTO" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSourceEventos" runat="server" 
            ConnectionString="<%$ ConnectionStrings:culturaConnectionString %>" 
            
            SelectCommand="SELECT [NOMBRE_EVENTO], [UBICACION_EVENTO], [INICIO_EVENTO], [FIN_EVENTO], [AUDIENCIA_EVENTO], [DESCRIPCION_EVENTO], [ID_EVENTO] FROM [EVENTO]">
        </asp:SqlDataSource>
    </div>
    
    
    <div id="sidebar">
    <div id="sidebar-bgtop">
    <div id="sidebar-bgbtm">
    <h4>Actividades</h4>
            <asp:DropDownList ID="DropDownList2" runat="server" 
            DataSourceID="SqlDataSource1" DataTextField="NOMBRE_EVENTO" 
            DataValueField="ID_EVENTO">
        </asp:DropDownList>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:culturaConnectionString %>" 
            SelectCommand="SELECT * FROM [EVENTO]"></asp:SqlDataSource>
            <asp:Button ID="Button5" runat="server" Text="Buscar actividades" 
            onclick="Button5_Click" />
            <br />
        <h4>Eventos registrados</h4>
        <p>
            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                DataSourceID="SqlDataSourceDetallesEvento" DataTextField="NOMBRE_EVENTO" 
                DataValueField="ID_EVENTO">
            </asp:DropDownList>
            
            <asp:SqlDataSource ID="SqlDataSourceDetallesEvento" runat="server" 
                ConnectionString="<%$ ConnectionStrings:culturaConnectionString %>" 
                SelectCommand="SELECT [NOMBRE_EVENTO], [ID_EVENTO] FROM [EVENTO]">
            </asp:SqlDataSource>
        </p>
        <table style="width:auto">
                <tr>
                    <td><asp:Button ID="Button4" runat="server" onclick="Button4_Click1" Text="Ver detalles" /></td>
                    <td><asp:Button ID="Button2" runat="server" Text="Modificar" 
                            onclick="Button2_Click" /></td>
                    <td><asp:Button ID="Button3" runat="server" Text="Eliminar" 
                            onclick="Button3_Click" /></td>
                </tr>
            </table>
        <h4>Opciones</h4>
        
            <table style="width:auto">
                <tr>
                <td><asp:Button ID="Button1" runat="server" Text="Nuevo evento" onclick="Button1_Click" /></td>
                <td><asp:Button ID="Button6" runat="server" Text="Volver" /></td>
                
                </tr>
            </table>
        
    </div>
    </div>
    </div>
    
    
</asp:Content>